import * as solutionsHttp from '@/api/solutions';
import * as newsHttp from '@/api/news';
import * as productHttp from '@/api/product';
import * as recruitmentHttp from '@/api/recruitment';
import * as partnerHttp from '@/api/partner';
import * as systemSettingHttp from '@/api/system-setting';
import * as userHttp from '@/api/user';
import * as contactInfoHttp from '@/api/contact-info';
import * as bannerHttp from '@/api/banner';

/*******************************
 * 接口 key（uid） 映射关系
 *
 * getSolutionList: 解决方案
 * getSolveQuestionList: 解决问题
 * newscenter: 新闻中心
 *******************************/

// 获取数据接口集合
export const getDataMap = {
  // 获取解决方案列表
  getSolutionList: async (params) => await solutionsHttp.getSolutionList(params),
  // 获取解决问题列表 - 解决方案
  getSolveQuestionList: async (params) => await solutionsHttp.getSolveQuestionList(params),
  // 获取新闻列表
  newscenter: async (params) => await newsHttp.getNewsList(params),
  // 产品服务列表
  productService: async params => await productHttp.getProductServiceList(params),
  // 获取解决问题列表 - 产品服务
  productSolveQuestion: async (params) => await productHttp.getSolveQuestionList(params),
  // 获取应用场景列表
  productScene: async (params) => await productHttp.getProductSceneList(params),
  // 人才招聘
  careers: async params => await recruitmentHttp.getRecruitmentList(params),
  // 合作伙伴
  partner: async params => await partnerHttp.getPartnerList(params),
  // 系统设置 - 关于云慧
  systemSetting: async params => await systemSettingHttp.getSystemSettingList(params),
  // 用户管理
  userManage: async params => await userHttp.getUserList(params),
  // 联系信息
  contactInfo: async params => await contactInfoHttp.getContactInfoList(params),
  // 图片管理
  banner: async params => await bannerHttp.getSystemBannerList(params),
};

// 删除数据，接口集合
export const deleteDataMap = {
  // 删除解决方案
  getSolutionList: async row => await solutionsHttp.deleteSolution({ solutionId: row.solutionId }),
  // 删除解决问题 - 解决方案
  getSolveQuestionList: async row => await solutionsHttp.deleteSolveQuestion({ solutionDescriptionId: row.solutionDescriptionId }),
  // 新闻
  newscenter: async row => await newsHttp.deleteNews({ id: row.newId }),
  // 产品服务列表
  productService: async row => await productHttp.deleteProductService({ productServiceId: row.productServiceId }),
  // 解决问题 - 产品服务
  productSolveQuestion: async row => await productHttp.deleteSolveQuestion({ solveQuestionId: row.solveQuestionId }),
  // 应用场景
  productScene: async row => await productHttp.deleteProductScene({ applicationSceneId: row.applicationSceneId }),
  // 人才招聘
  careers: async row => await recruitmentHttp.deleteRecruitment({ id: row.recruitmentId }),
  // 合作伙伴
  partner: async row => await partnerHttp.deletePartner({ partnerId: row.partnerId }),
  // 系统设置 - 关于云慧
  systemSetting: async row => await systemSettingHttp.deleteSystemSetting({ systemSettingId: row.systemSettingId }),
  // 用户管理
  userManage: async row => await userHttp.deleteUser({ userId: row.userId }),
  // 联系信息
  contactInfo: async row => await contactInfoHttp.deleteContactInfo({ contactInfoId: row.contactInfoId }),
  // 图片管理
  banner: async row => await bannerHttp.deleteSystemBanner({ systemBannerId: row.systemBannerId }),
};


// 启用数据，接口集合
export const enableDataMap = {
  // 解决方案
  getSolutionList: async row => await solutionsHttp.enableSolution({ solutionId: row.solutionId }),
  // 解决问题 - 解决方案
  getSolveQuestionList: async row => await solutionsHttp.enableSolveQuestion({ solutionDescriptionId: row.solutionDescriptionId }),
  // 新闻
  newscenter: async row => await newsHttp.enableNews({ newId: row.newId }),
  // 解决问题 - 产品服务
  productSolveQuestion: async row => await productHttp.enableSolveQuestion({ solveQuestionId: row.solveQuestionId }),
  // 人才招聘
  careers: async row => await recruitmentHttp.enableRecruitment({ recruitmentId: row.recruitmentId }),
  // 合作伙伴
  partner: async row => await partnerHttp.enablePartner({ partnerId: row.partnerId }),
  // 用户管理
  userManage: async row => await userHttp.enableUser({ userId: row.userId }),
  // 联系信息
  contactInfo: async row => await contactInfoHttp.enableContactInfo({ contactInfoId: row.contactInfoId }),
  // 图片管理
  banner: async row => await bannerHttp.enableSystemBanner({ systemBannerId: row.systemBannerId }),
};


// 禁用数据，接口集合
export const disableDataMap = {
  // 解决方案
  getSolutionList: async row => await solutionsHttp.disableSolution({ solutionId: row.solutionId }),
  // 解决问题 - 解决方案
  getSolveQuestionList: async row => await solutionsHttp.disableSolveQuestion({ solutionDescriptionId: row.solutionDescriptionId }),
  // 新闻
  newscenter: async row => await newsHttp.disableNews({ newId: row.newId }),
  // 解决问题 - 产品服务
  productSolveQuestion: async row => await productHttp.disableSolveQuestion({ solveQuestionId: row.solveQuestionId }),
  // 人才招聘
  careers: async row => await recruitmentHttp.disableRecruitment({ recruitmentId: row.recruitmentId }),
  // 合作伙伴
  partner: async row => await partnerHttp.disablePartner({ partnerId: row.partnerId }),
  // 用户管理
  userManage: async row => await userHttp.disableUser({ userId: row.userId }),
  // 联系信息
  contactInfo: async row => await contactInfoHttp.disableContactInfo({ contactInfoId: row.contactInfoId }),
  // 图片管理
  banner: async row => await bannerHttp.disableSystemBanner({ systemBannerId: row.systemBannerId }),
};


// 编辑弹窗组件 name
export const componentNameMap = {
  getSolutionList: 'edit-solution', // 解决方案
  getSolveQuestionList: 'solve-question', // 解决方案 - 解决问题 / 项目优势
  productService: 'edit-product', // 产品服务
  productSolveQuestion: 'product-solve-question', // 产品服务 - 解决问题
  productScene: 'edit-scene', // 应用场景
  partner: 'edit-partner', // 合作伙伴
  systemSetting: 'system-setting', // 系统设置 - 关于云慧
  userManage: 'edit-user', // 用户管理
  contactInfo: 'edit-contact-info', // 联系信息
  banner: 'edit-banner', // 图片管理
};

// 详情弹框组件 name
export const detailComponentNameMap = {
  
};